<?php
/**
 * <https://y.st./>
 * Copyright (C) 2016-2017 //y.st. <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'nav' => array('en/main'),
	'title' => 'Alex Yst&apos;s coursework',
	'copyright year' => '2016-2017',
	'body' => <<<END
<p>
	I&apos;m currently in school studying for my computer science degree at <a href="http://www.uopeople.edu/">University of the People</a>.
	This index listing includes major assignments that I&apos;ve completed, such as written assignments (essays), but excludes minor work such as discussion assignments.
	The pages labeled &quot;Learning Journal&quot; actually contain multiple unnamed submissions for learning journal assignments that were presented throughout the course of the courses.
	For a general idea of what courses I have left to take and what their prerequisites are, check out the <a href="/en/weblog/2017/07-July/28.xhtml#university">latest update to my course tree in my journal</a>.
</p>
END
);

foreach($coursework as $key_coursecode => $value_coursearray):
	$xhtml['body'] .= <<<END
<header>
	<h2 id="$key_coursecode">{$value_coursearray['title']}</h2>
	<p>
		{$value_coursearray['subtitle']}
	</p>
</header>
<ol>

END;
	if(file_exists(__DIR__."/$key_coursecode/index.xhtml")):
		$xhtml['body'] .= <<<END
	<li value="0">
		<a href="/en/coursework/$key_coursecode/">Learning Journal</a>
	</li>

END;
	else:
		$xhtml['body'] .= <<<END
	<li value="0">
		<span class="hyperlink_unavailable">Learning Journal</span>
	</li>

END;
	endif;

	foreach($value_coursearray['assignments'] as $key_href => $value_assignment):
		$xhtml['body'] .= <<<END
	<li value="{$value_assignment['unit']}">
		<a href="/en/coursework/$key_coursecode/$key_href.xhtml">{$value_assignment['title']}</a>
	</li>

END;
	endforeach;

	$xhtml['body'] .= <<<END
</ol>

END;
endforeach;
